<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
    <style>
        .red {
            background-color: red;
        }
    </style>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(item, index) in  list" @click="clickHander(index)" >
                <div :class="current === index ? change: 0">{{item}}{{index}}</div>
            </li>
        </ul>
    </div>

    <script>
        new Vue({
            el: "#app",
            data:{
                list:["崔小狗", "刘小猫", "蕾蕾姐"],
                current: -1,
                change: "red"
            },
            methods:{
                clickHander(index){
                    this.current = index;
                }
            }
        })
    </script>
</body>
</html>